// Author: wsfuyibing <682805@qq.com>
// Date: 2025-05-14

package kind

// ArcadeState
// 钓场状态.
type ArcadeState int

const (
	_ ArcadeState = iota
	ArcadeStateEnabled
	ArcadeStateDisabled
	ArcadeStateFreezed
	ArcadeStateForbidden
)

var (
	arcadeStateTexts = map[ArcadeState]string{
		ArcadeStateEnabled:   "启用",
		ArcadeStateDisabled:  "停用",
		ArcadeStateFreezed:   "临时冻结",
		ArcadeStateForbidden: "永久封禁",
	}
	arcadeStateUnknownText = "未知"
	arcadeStateFlags       = map[ArcadeState]string{
		ArcadeStateEnabled:   "enabled",
		ArcadeStateDisabled:  "disabled",
		ArcadeStateFreezed:   "freezed",
		ArcadeStateForbidden: "forbidden",
	}
	arcadeStateUnknownFlag = "unknown"
)

func (o ArcadeState) Flag() string {
	if str, ok := arcadeStateFlags[o]; ok {
		return str
	}
	return arcadeStateUnknownFlag
}

func (o ArcadeState) IsDisabled() bool { return o == ArcadeStateDisabled }
func (o ArcadeState) IsEnabled() bool  { return o == ArcadeStateEnabled }

func (o ArcadeState) Text() string {
	if str, ok := arcadeStateTexts[o]; ok {
		return str
	}
	return arcadeStateUnknownText
}
